package com.ruoyi.bl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bl.mapper.BlDeliveryDocMapper;
import com.ruoyi.bl.domain.BlDeliveryDoc;
import com.ruoyi.bl.service.IBlDeliveryDocService;

/**
 * 发货和配送单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-07
 */
@Service
public class BlDeliveryDocServiceImpl implements IBlDeliveryDocService 
{
    @Autowired
    private BlDeliveryDocMapper blDeliveryDocMapper;

    /**
     * 查询发货和配送单
     * 
     * @param deliveryId 发货和配送单主键
     * @return 发货和配送单
     */
    @Override
    public BlDeliveryDoc selectBlDeliveryDocByDeliveryId(Long deliveryId)
    {
        return blDeliveryDocMapper.selectBlDeliveryDocByDeliveryId(deliveryId);
    }

    /**
     * 查询发货和配送单列表
     * 
     * @param blDeliveryDoc 发货和配送单
     * @return 发货和配送单
     */
    @Override
    public List<BlDeliveryDoc> selectBlDeliveryDocList(BlDeliveryDoc blDeliveryDoc)
    {
        return blDeliveryDocMapper.selectBlDeliveryDocList(blDeliveryDoc);
    }

    /**
     * 新增发货和配送单
     * 
     * @param blDeliveryDoc 发货和配送单
     * @return 结果
     */
    @Override
    public int insertBlDeliveryDoc(BlDeliveryDoc blDeliveryDoc)
    {
        blDeliveryDoc.setCreateTime(DateUtils.getNowDate());
        return blDeliveryDocMapper.insertBlDeliveryDoc(blDeliveryDoc);
    }

    /**
     * 修改发货和配送单
     * 
     * @param blDeliveryDoc 发货和配送单
     * @return 结果
     */
    @Override
    public int updateBlDeliveryDoc(BlDeliveryDoc blDeliveryDoc)
    {
        blDeliveryDoc.setUpdateTime(DateUtils.getNowDate());
        return blDeliveryDocMapper.updateBlDeliveryDoc(blDeliveryDoc);
    }

    /**
     * 批量删除发货和配送单
     * 
     * @param deliveryIds 需要删除的发货和配送单主键
     * @return 结果
     */
    @Override
    public int deleteBlDeliveryDocByDeliveryIds(Long[] deliveryIds)
    {
        return blDeliveryDocMapper.deleteBlDeliveryDocByDeliveryIds(deliveryIds);
    }

    /**
     * 删除发货和配送单信息
     * 
     * @param deliveryId 发货和配送单主键
     * @return 结果
     */
    @Override
    public int deleteBlDeliveryDocByDeliveryId(Long deliveryId)
    {
        return blDeliveryDocMapper.deleteBlDeliveryDocByDeliveryId(deliveryId);
    }

    @Override
    public BlDeliveryDoc findBlDeliveryAssignUser(BlDeliveryDoc blDeliveryDoc) {
        return blDeliveryDocMapper.findBlDeliveryAssignUser(blDeliveryDoc);
    }

    @Override
    public List<BlDeliveryDoc> findBlDeliveryTimeout(BlDeliveryDoc blDeliveryDoc) {
        return blDeliveryDocMapper.findBlDeliveryTimeout(blDeliveryDoc);
    }

    @Override
    public BlDeliveryDoc findBlDeliveryAssignTimeOutUser(BlDeliveryDoc blDeliveryDoc) {
        return blDeliveryDocMapper.findBlDeliveryAssignTimeOutUser(blDeliveryDoc);
    }

    @Override
    public List<BlDeliveryDoc> selectfinalPsList(BlDeliveryDoc blDeliveryDoc) {
        return blDeliveryDocMapper.selectfinalPsList(blDeliveryDoc);
    }
}
